<div class="search">
  <a (click)="Add()">添加</a>
</div>

<nz-table #ajaxTable nzShowSizeChanger [nzFrontPagination]="false" [nzData]="dataSet" [nzLoading]="loading" [nzTotal]="total"
  [nzShowTotal]="totalTemplate" [(nzPageIndex)]="pageIndex" [(nzPageSize)]="pageSize" (nzPageIndexChange)="searchData()"
  (nzPageSizeChange)="searchData(true)" [nzScroll]="{ x:'1300px',y: '600px' }">
  <thead>
    <tr>
      <th nzWidth="60px" nzLeft="0px">序号</th>
      <th nzWidth="100px">商户名称</th>
      <th nzWidth="100px">手机号</th>
      <th nzWidth="100px">真实姓名</th>
      <th nzWidth="100px">身份证号</th>
      <th nzWidth="100px">微信openid</th>
      <th nzWidth="160px" nzRight="0px">操作</th>
    </tr>
  </thead>
  <tbody>
    <tr *ngFor="let data of ajaxTable.data;index as i">
      <td nzLeft="0px">{{i+1}}</td>
      <td>{{data.merchantname}}</td>
      <td>{{data.wechatphone}}</td>
      <td>{{data.wechatrealname}}</td>
      <td>{{data.wechatidnum}}</td>
      <td>{{data.wechatopenid}}</td>
      <td nzRight="0px">
        <a (click)="Delete(data._id)">删除</a>
      </td>
    </tr>
  </tbody>
</nz-table>

<ng-template #totalTemplate let-total>
  共 {{total}} 条
</ng-template>

<nz-modal [(nzVisible)]="isinfoVisible" nzTitle="添加账户信息" (nzOnCancel)="handleCancel()" (nzOnOk)="handleOk()" nzWrapClassName="vertical-center-modal"
  [nzMaskClosable]="false" nzWidth="800">
  <div style="margin-bottom: 16px;">
    <nz-input-group nzAddOnBefore="商户名称">
      <input type="text" disabled="true" nz-input [(ngModel)]="doc.merchantname">
    </nz-input-group>
    <nz-input-group nzAddOnBefore="手机号">
      <input type="text" nz-input [(ngModel)]="doc.wechatphone"> <a (click)="serchuser()">搜索</a>
    </nz-input-group>
    <nz-input-group nzAddOnBefore="微信openid">
      <input type="text" disabled="true" nz-input [(ngModel)]="doc.wechatopenid">
    </nz-input-group>
    <nz-input-group nzAddOnBefore="真实姓名">
      <input type="text" nz-input [(ngModel)]="doc.wechatrealname">
    </nz-input-group>
    <nz-input-group nzAddOnBefore="身份证号">
      <input type="text" nz-input [(ngModel)]="doc.wechatidnum">
    </nz-input-group>
  </div>
</nz-modal>


